package com.dahua.messagesyncsh.rabbitmq;

import org.springframework.stereotype.Component;

@Component
public class RabbitmqConsumer {

    /*@RabbitListener(queues = "energy-data", ackMode = "MANUAL")
    public void receiveMessage(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws IOException {
        try {
            System.out.println("Received message: " + message);
            channel.basicAck(deliveryTag, false);
        } catch (Exception e) {
            channel.basicNack(deliveryTag, false, true); // 重新入队
        }
    }*/
}
